<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		用户名
		<input type="text" id="usernaem" />
		<button id="btn1">原始js</button>
		<button id="btn2">jQuery</button>
		<script src="../js/jquery.js"></script>
		<script>
			var btn1 = document.getElementById("btn1");
			btn1.onclick = function(){
				var usernaem = document.getElementById("usernaem");
				alert(usernaem.value)
			}

			$(function(){
				$("#btn2").click(function(){
					var username = $("#usernaem").val()
					alert(username);
				})
			})
		</script>
	</body>
</html>
